package edu.xhu.communityantiepidemicsystemback.common.utils;



import org.springframework.util.DigestUtils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Md5Utils {
    private static  final  String KEY = "HQYJ";
    public static String md5(){
        Date date = new Date();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        String curDate = simpleDateFormat.format(date);
        return DigestUtils.md5DigestAsHex((KEY+curDate).getBytes());
    }
}
